﻿<%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false"
    CodeBehind="Default.aspx.vb" Inherits="helzwebscripting._Default" %>

<%@ Register assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h1 class="bigHeadings">Welcome to the Twilighters Community!</h1><br />
    <div>
    <asp:Image runat="server" ImageUrl="~/Pictures/Meadow.jpg" CssClass="imgOnHome" Width="270px" Height="180px"/>
        <br />
        <span style="font-family: Arial; font-size: 12pt;">
    Want to discuss your favourite scenes from the Twilight Saga and relive the 
    moment?
    <br />
    Have a favourite line or one you just can&#39;t quite remember?<br />
        Want to cast your vote for Team Edward or Team Jacob?<br />
    Are the vampires, werewolves and mortals on your mind?<br />
    <br />
    Socialise with the Twilighters today and <asp:hyperlink Text="join" NavigateUrl="~/Account/Register.aspx" runat="server"></asp:hyperlink>&nbsp;the community for free - 
        <br />
        promise 
    we won&#39;t <em>bite</em>!</span><br />
    <br />
    </div>
    <br />

<%--CHARACTER BREAKDOWN BY TOTAL QUOTES--%>
<span class="smallHeadings">TwiVeterans</span><br />
    <span style="font-family: Arial; font-size: 12pt;">
    The Twilighters Community is built upon its members. We&#39;d like to show 
    appreciation by awarding the members who have uploaded the most scenes and 
    quotes to the site with a special TwiVeteran status.<br />
    <br />
    <strong>Twilight Artist 
    </strong> 
    <br />
   Helping us visualise rich scenes we&#39;d forgotten were so good or didn&#39;t notice in 
    the first place.<br />
    &nbsp;<asp:GridView ID="scenesUserGV" runat="server" AutoGenerateColumns="False" 
        DataSourceID="SqlDataSource1" GridLines="None" CssClass="gridviewList">
        <Columns>
            <asp:HyperLinkField DataNavigateUrlFields="TwiWriter" DataNavigateUrlFormatString="Profile.aspx?TwiWriter={0}" 
                DataTextField="TwiWriter" HeaderText="TwiWriter" />
            <asp:BoundField DataField="UserScenes" HeaderText="Scenes"/>
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:TwilightConn %>" 
        ProviderName="<%$ ConnectionStrings:TwilightConn.ProviderName %>" 
        SelectCommand="SELECT TOP 1 TwiWriter, UserScenes FROM UserUploadedScenesView">
    </asp:SqlDataSource>

    <br />
    <strong>Twilight Wordsmith</strong><br />
    Finding the most beautiful, ironic or comic quotes to relive our favourite moments.&nbsp;<br />
    TwiVeteran&#39;s total quotes added:<br />
    <br />
    <asp:GridView ID="quotesUserGV" runat="server" DataSourceID="SqlDataSource2" AutoGenerateColumns="False" GridLines="None" CssClass="gridviewList">
      <Columns>
      
            <asp:HyperLinkField DataNavigateUrlFields="TwiWriter" DataNavigateUrlFormatString="Profile.aspx?TwiWriter={0}" 
                DataTextField="TwiWriter" HeaderText="TwiWriter"/>
                <asp:BoundField DataField="UserQuotes" HeaderText="Quotes"/>
        </Columns>
    </asp:GridView></span>
     <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:TwilightConn %>" 
        ProviderName="<%$ ConnectionStrings:TwilightConn.ProviderName %>" 
        SelectCommand="SELECT TOP 1 TwiWriter, UserQuotes FROM UserUploadedQuotesView">    </asp:SqlDataSource>
    <br />
    <br />


<%--MOST VIEWED QUOTES--%>
     <span class="smallHeadings">Chatterbox: The 3 Most Talked About Scenes by the Community</span><br /><br />

    <asp:GridView ID="mostDiscussedScenesGV" runat="server" AutoGenerateColumns="False" 
         DataSourceID="discussedScenesDS" class="gridviewList">
     <Columns>
         <asp:HyperLinkField DataNavigateUrlFields="SceneFKID" 
             DataNavigateUrlFormatString="SceneDetails.aspx?ID={0}" DataTextField="SceneName" HeaderText="Name of scene"/>
         <asp:BoundField DataField="MostDiscussedScene" HeaderText="Comments" />
     </Columns>
     </asp:GridView>
     <asp:SqlDataSource ID="discussedScenesDS" runat="server" 
         ConnectionString="<%$ ConnectionStrings:TwilightConn %>" 
         ProviderName="<%$ ConnectionStrings:TwilightConn.ProviderName %>" 
         SelectCommand="SELECT TOP 3 * FROM [MostDiscussedScene]"></asp:SqlDataSource>
    <br />
    <br />

<%--CHARACTER BREAKDOWN BY TOTAL QUOTES--%>

    <span class="smallHeadings">Take a look: The 3 Most Viewed Scenes</span><br />

    <br />
    
    <asp:GridView ID="mostViewedScenesGV" runat="server" AutoGenerateColumns="False" 
         DataSourceID="SceneViewsDS" class="gridviewList">
     <Columns>
         <asp:HyperLinkField DataNavigateUrlFields="ScenesFKID" 
             DataNavigateUrlFormatString="SceneDetails.aspx?ID={0}" DataTextField="SceneName" HeaderText="Name of scene"/>
         <asp:BoundField DataField="MostViewedScenesView" HeaderText="Views" />
     </Columns>
     </asp:GridView>
     <asp:SqlDataSource ID="SceneViewsDS" runat="server" 
         ConnectionString="<%$ ConnectionStrings:TwilightConn %>" 
         ProviderName="<%$ ConnectionStrings:TwilightConn.ProviderName %>" 
         SelectCommand="SELECT TOP 3 * FROM [MostViewedScenesView]"></asp:SqlDataSource>
    <br />
    <br />

<%--MOST VIEWED QUOTES--%>

    <span class="smallHeadings">What's that line? The 3 Most Viewed Quotes</span><br />

    <br />
    
    <asp:GridView ID="mostViewedQuotesGV" runat="server" AutoGenerateColumns="False" 
         DataSourceID="QuoteViewsDS" class="gridviewList">
     <Columns>
         <asp:HyperLinkField DataNavigateUrlFields="QuoteFKID" 
             DataNavigateUrlFormatString="QuoteDiscuss.aspx?ID={0}" DataTextField="Quote" HeaderText="Quote"/>
         <asp:BoundField DataField="MostViewedQuote" HeaderText="Views" />
     </Columns>
     </asp:GridView>
     <asp:SqlDataSource ID="QuoteViewsDS" runat="server" 
         ConnectionString="<%$ ConnectionStrings:TwilightConn %>" 
         ProviderName="<%$ ConnectionStrings:TwilightConn.ProviderName %>" 
         SelectCommand="SELECT TOP 3 * FROM [MostViewedQuotesView]"></asp:SqlDataSource>

    <br /><br />

<%--CHARACTER BREAKDOWN BY TOTAL QUOTES--%>
    <span class="smallHeadings">Top 5 Characters by Total Number of Quotes</span><br />
    <br />
    <asp:Chart ID="Chart1" runat="server" DataSourceID="charQuotesDS" 
        ImageStorageMode="UseImageLocation" Width="442px" >
        <series>
            <asp:Series Name="Series1" XValueMember="Character"  
                YValueMembers="PopularCharQuotes" Color="#C98D8D" >
            </asp:Series>
        </series>
        <chartareas>
            <asp:ChartArea Name="Characters by total quotes">
             <AxisX Title="Character" TitleFont="Arial, 12pt" ></AxisX>
            <AxisY Title="Number of Quotes" TitleFont="Arial, 12pt"></AxisY>  
            </asp:ChartArea>
        </chartareas>
    </asp:Chart>
    <asp:SqlDataSource ID="charQuotesDS" runat="server" 
        ConnectionString="<%$ ConnectionStrings:TwilightConn %>" 
        ProviderName="<%$ ConnectionStrings:TwilightConn.ProviderName %>" 
        SelectCommand="SELECT TOP 5 [Character], [PopularCharQuotes] FROM [CharQuoteCountView]">
    </asp:SqlDataSource>
    <br />
    <br />
    <br />
    <br />


    <br />
    <br />



</asp:Content>
